using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using Voodoo.Pattern;

[RequireComponent(typeof(Button))]
public class DrawingReadyButton : MonoBehaviour
{
	private Button m_Button;

	private bool m_Clicked;

	private void Awake()
	{
		m_Button = GetComponent<Button>();
	}

	private void Start()
	{
		m_Button.onClick.AddListener(OnButtonClicked);
	}

	private void OnDestroy()
	{
		m_Button.onClick.RemoveListener(OnButtonClicked);
	}

	private void OnButtonClicked()
	{
		SceneManager.LoadSceneAsync("GamePlay").completed += delegate
		{
			SingletonMB<GameManager>.Instance.IsDrawingLevel = true;
		};
	}
}
